<ui:composition template="/admin/templates/ui2.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite/primefaces"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:archer="http://java.sun.com/jsf/archer"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
	<f:metadata>
		<f:viewParam name="id" value="#{empHolidayHome.id}"></f:viewParam>
	</f:metadata>

	<ui:define name="content">
		<div class="entry">
			<p:toolbar styleClass="admin-nav-toolbar">
				<p:toolbarGroup>
					<h:outputLabel
						value="#{commonMsg.currentPositionLabel} 添加休息日"></h:outputLabel>
				</p:toolbarGroup>
				<p:toolbarGroup align="right">
					<p:separator />
					<p:button outcome="/admin/checktime/EmpHolidayList"
						value="休息日列表"></p:button>
				</p:toolbarGroup>
			</p:toolbar>
			<p:spacer></p:spacer>
			<h:form id="form">
				<h:panelGrid columns="2" columnClasses="col1,col2" id="panel">

					<h:outputLabel value="日期"></h:outputLabel>
					<p:calendar  value="#{empHolidayHome.instance.holiday}" 
                    	pattern="yyyyMMdd" navigator="true" showButtonPanel="true" required="true" label="日期">
                    </p:calendar>

					<h:outputLabel value="状态"></h:outputLabel>
						<h:selectOneMenu value="#{empHolidayHome.instance.status}" required="true" label="假期类型">
							<f:selectItem itemLabel="请选择假期类型" itemValue=""></f:selectItem>
							<f:selectItem itemLabel="双休日" itemValue="双休日"></f:selectItem>
							<f:selectItem itemLabel="法定假日" itemValue="法定假日"></f:selectItem>
							<f:selectItem itemLabel="公司活动假日" itemValue="公司活动假日"></f:selectItem>
						</h:selectOneMenu>


					<h:outputLabel value="#{commonMsg.actionLabel}"></h:outputLabel>
					<ui:fragment>
						
						<p:commandButton id="saveBtn" action="#{empHolidayHome.saveHoliday}"
							ajax="false" value="#{commonMsg.saveLabel}"></p:commandButton>
						<p:commandButton type="reset" value="#{commonMsg.resetLabel}"></p:commandButton>
						<p:blockUI block="panel" trigger="saveBtn" />
					</ui:fragment>
				</h:panelGrid>

			</h:form>
		</div>
	</ui:define>
</ui:composition>

